<?php

namespace App\Http\Controllers;

use App\Models\Article;
use Illuminate\Http\Request;
use App\Facades\Tx;

class ArticleController extends Controller
{
    public function index(Request $request)
    {
        $list = Article::where("status",2)->paginate($request->get("per_page")??15);
        return Tx::success($list);
    }
    public function show(Article $article)
    {
        return Tx::success($article);
    }
}
